dir.create( "ChIPQCreport", showWarnings=FALSE )
ggsave(plotCC(ExpRes2),file=file.path("ChIPQCreport","CCPlot.png"))
ggsave(plotCoverageHist(ExpRes2),file=file.path("ChIPQCreport","CoverageHistogramPlot.png"))
ggsave(plotRegi(ExpRes2),file=file.path("ChIPQCreport","GenomicFeatureEnrichment.png"))
ggsave(plotFribl(ExpRes2),file=file.path("ChIPQCreport","Ribl.png"))
ggsave(plotFrip(ExpRes2),file=file.path("ChIPQCreport","Rip.png"))
ggsave(plotRap(ExpRes2),file=file.path("ChIPQCreport","Rap.png"))
r <- newCustomReport( "ChIPQC Report" );
s1 <- newSection( "QC Metrics Summary" );
p1 <- newParagraph( "First...some ChIPQC" );
t1 <- newTable(QCmetrics(ExpRes2)[,c(1,2,3,4,7,9)], "Metrics" ); # w/ caption
p2 <- newParagraph( "Here is some QC stuff" );
s2 <- newSection( "QC Metrics Figures" );
ccPlot <- newFigure(file.path("CCPlot.png"),
type = IMAGE.TYPE.RASTER, exportId = NULL,
protection = PROTECTION.PUBLIC)
covhistPlot <- newFigure(file.path("CoverageHistogramPlot.png"),
type = IMAGE.TYPE.RASTER, exportId = NULL,
protection = PROTECTION.PUBLIC)
gfePlot <- newFigure(file.path("GenomicFeatureEnrichment.png"),
type = IMAGE.TYPE.RASTER, exportId = NULL,
protection = PROTECTION.PUBLIC)
riblPlot <- newFigure(file.path("Ribl.png"),
type = IMAGE.TYPE.RASTER, exportId = NULL,
protection = PROTECTION.PUBLIC)
ripPlot <- newFigure(file.path("Rip.png"),
type = IMAGE.TYPE.RASTER, exportId = NULL,
protection = PROTECTION.PUBLIC)
rapPlot <- newFigure(file.path("Rap.png"),
type = IMAGE.TYPE.RASTER, exportId = NULL,
protection = PROTECTION.PUBLIC)
# Phase 2: assemble report structure bottom-up
s1 <- addTo(s1,t1,p2);
s2 <- addTo(s2,ccPlot,
covhistPlot,
gfePlot,
riblPlot,
ripPlot,
rapPlot
);
